# Contributor: Damian Kurek <starfire24680@gmail.com>
# Maintainer: Damian Kurek <starfire24680@gmail.com>
pkgname=kodi-vfs-sacd
pkgver=2.0.0
_realname=Matrix
pkgrel=0
pkgdesc="SACD VFS add-on for Kodi"
options="!check" # no test suite
url="https://github.com/xbmc/vfs.sacd"
arch="x86 x86_64 aarch64 armv7" # kodi is available only on those arches
license="GPL-2.0-only"
makedepends="cmake libssh-dev kodi-dev"
source="$pkgname-$pkgver-$_realname.tar.gz::https://github.com/xbmc/vfs.sacd/archive/$pkgver-$_realname.tar.gz"
builddir="$srcdir/vfs.sacd-$pkgver-$_realname"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake/kodi \
		-DUSE_LTO=1
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
1b701189c81cd38d410de10382942478c017647050ddc6bce14f48558cd7085cae5c085cda213c88a15815be01199f8ef00f0306f4de2d3ca82293b20179f78a  kodi-vfs-sacd-2.0.0-Matrix.tar.gz
"
